package agentzia;

import java.io.Serializable;

public class Irteerak implements Serializable {

    private int irteeraKod;
    private String lekua;
    private int pertsonaKop;
    private String[] datak;
    private int dataKop = 0;
    private int[] egunKop;
    private float prezioa;
    private static final long serialVersionUID = 1L;

    public Irteerak(int irteeraKod, String izena, int pertsonaKop, float prezioa) {
        this.irteeraKod = irteeraKod;
        this.lekua = izena;
        this.pertsonaKop = pertsonaKop;
        this.prezioa = prezioa;
    }

    public int getIrteeraKod() {
        return this.irteeraKod;
    }
    
    public String getLekua() {
        return this.lekua;
    }

    public void setLekua(String izena) {
        this.lekua = izena;
    }

    public int getPertsonaKop() {
        return this.pertsonaKop;
    }

    public void setPertsonaKop(int pertsonaKop) {
        this.pertsonaKop = pertsonaKop;
    }

    public void setDatakSize(int size) {
        this.datak = new String[size];
    }

    public String[] getDatak() {
        return this.datak;
    }

    public void addData(String data, int indice) {
        this.datak[indice] = data;
        this.dataKop++;
    }

    public void setEgunakSize(int size) {
        this.egunKop = new int[size];
    }
    
    public void addEgunak(int eK, int i) {
        this.egunKop[i] = eK;
    }
    
    public int[] getEgunak() {
        return this.egunKop;
    }

    public float getPrezioa() {
        return this.prezioa;
    }

    public int getBaieztapenZenbakia() {
        return (int)Math.round(Math.random()*10000);
    }

}